<?php
class Core_Component_Sef_Business_Rewrite_Flow_Output extends Core_Component_Sef_Business_Rewrite_Flow_Base{
	
	public function __construct(){}
	
	public function run(array &$sources){
		$result = array();
		if(empty($sources)){
			return $result;
		}
		
		foreach($this->getRewriters() as $rewriter){
			$rewriter->rewriteOutput($sources, $result);
			if(count($sources) == 0){
				break;
			}
		}
		
		if(count($sources) > 0){
			foreach($sources as $url){
				$result[$url] = $url;
			}
		}
		return $result;
	}
}